﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Web;
using VideoNetApplication.Common.Helper;

namespace VideoNetApplication.Common
{
  public  class BaseControl : System.Web.UI.UserControl
    {
      private int _schoolId;
      public int SchoolId
      {
          get
          {
              if (ConfigurationManager.AppSettings["IsConfig"] == "1")
              {

                  if (HttpContext.Current.Request["SchoolId"] != null && StringUtils.IsNumeric(HttpContext.Current.Request["SchoolId"]))
                  {
                      _schoolId = Convert.ToInt32(HttpContext.Current.Request["SchoolId"]);
                  }
              }
              else
              {

                  _schoolId = Convert.ToInt32(ConfigurationManager.AppSettings["SchoolID"]);
              }
              return _schoolId;
          }
          set { _schoolId = value; }
      }
      private string _baseurl = ConfigurationManager.AppSettings["BaseUrl"];
      public string Baseurl
      {
          get { return _baseurl; }
          set { _baseurl = value; }
      }

      private string _pictureServerName = ConfigurationManager.AppSettings["PictureServerName"];
      public string PictureServerName
      {
          get { return _pictureServerName; }
          set { _pictureServerName = value; }
      }
    }
}
